Optimal. Leaf size=26 \[ \frac{x^2}{2}+\frac{2}{3} \log (1-x)+\frac{4}{3} \log (x+2) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0245635, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {1593, 800, 632, 31} \[ \frac{x^2}{2}+\frac{2}{3} \log (1-x)+\frac{4}{3} \log (x+2) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 800
Rule 632
Rule 31
Rubi steps
\begin{align*} \int \frac{x^2+x^3}{-2+x+x^2} \, dx &=\int \frac{x^2 (1+x)}{-2+x+x^2} \, dx\\ &=\int \left (x+\frac{2 x}{-2+x+x^2}\right ) \, dx\\ &=\frac{x^2}{2}+2 \int \frac{x}{-2+x+x^2} \, dx\\ &=\frac{x^2}{2}+\frac{2}{3} \int \frac{1}{-1+x} \, dx+\frac{4}{3} \int \frac{1}{2+x} \, dx\\ &=\frac{x^2}{2}+\frac{2}{3} \log (1-x)+\frac{4}{3} \log (2+x)\\ \end{align*}
Mathematica [A] time = 0.0046166, size = 26, normalized size = 1. \[ \frac{x^2}{2}+\frac{2}{3} \log (1-x)+\frac{4}{3} \log (x+2) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.047, size = 19, normalized size = 0.7 \begin{align*}{\frac{{x}^{2}}{2}}+{\frac{4\,\ln \left ( 2+x \right ) }{3}}+{\frac{2\,\ln \left ( -1+x \right ) }{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.998585, size = 24, normalized size = 0.92 \begin{align*} \frac{1}{2} \, x^{2} + \frac{4}{3} \, \log \left (x + 2\right ) + \frac{2}{3} \, \log \left (x - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.36524, size = 58, normalized size = 2.23 \begin{align*} \frac{1}{2} \, x^{2} + \frac{4}{3} \, \log \left (x + 2\right ) + \frac{2}{3} \, \log \left (x - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.102618, size = 20, normalized size = 0.77 \begin{align*} \frac{x^{2}}{2} + \frac{2 \log{\left (x - 1 \right )}}{3} + \frac{4 \log{\left (x + 2 \right )}}{3} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.19172, size = 27, normalized size = 1.04 \begin{align*} \frac{1}{2} \, x^{2} + \frac{4}{3} \, \log \left ({\left | x + 2 \right |}\right ) + \frac{2}{3} \, \log \left ({\left | x - 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]